package spring5.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import spring5.service.UserService;

//@RunWith(SpringJUnit4ClassRunner.class) //指定单元测试框架
//@ContextConfiguration("classpath:bean2.xml")

@SpringJUnitConfig(locations = "classpath:bean1.xml")
public class JTest4 {

    @Autowired
    private UserService userService;

    @Test
    public void test() {
        userService.accountMoney();
    }

}
